﻿namespace HRM.CORE.REPORT
{
    using APP.HELPER.Utils.Security;
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptListCandidate : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private XRTableCell chSex;
        private IContainer components;
        private DetailBand Detail;
        private DetailBand Detail1;
        private DetailReportBand DetailReport;
        private XRTableCell dtBirthday;
        private GroupHeaderBand GroupHeader2;
        private HRM_CANDIDATE l_Candidate;
        private HRM_RECRUITMENT l_Recruitment;
        private int m_Order;
        private string m_RecruitmentCode;
        private XRPictureBox ptPhoto;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRLabel txtAddress;
        private XRTableCell txtBirthPlace;
        private XRTableCell txtCandidateCode;
        private XRTableCell txtCellPhone;
        private XRLabel txtCompany;
        private XRTableCell txtEmployeeAddress;
        private XRTableCell txtFirstName;
        private XRTableCell txtLastName;
        private XRTableCell txtOrder;
        private XRLabel txtRecruitment;
        private XRLabel txtUnit;
        private XRLabel xrLabel2;
        private XRLabel xrLabel4;
        private XRLine xrLine2;
        private XRTable xrTable1;
        private XRTable xrTable2;
        private XRTableCell xrTableCell1;
        private XRTableCell xrTableCell13;
        private XRTableCell xrTableCell14;
        private XRTableCell xrTableCell17;
        private XRTableCell xrTableCell18;
        private XRTableCell xrTableCell2;
        private XRTableCell xrTableCell21;
        private XRTableCell xrTableCell3;
        private XRTableCell xrTableCell4;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;

        public rptListCandidate()
        {
            this.l_Candidate = new HRM_CANDIDATE();
            this.l_Recruitment = new HRM_RECRUITMENT();
            this.m_RecruitmentCode = "";
            this.m_Order = 0;
            this.components = null;
            this.InitializeComponent();
        }

        public rptListCandidate(string RecruitmentCode)
        {
            this.l_Candidate = new HRM_CANDIDATE();
            this.l_Recruitment = new HRM_RECRUITMENT();
            this.m_RecruitmentCode = "";
            this.m_Order = 0;
            this.components = null;
            this.InitializeComponent();
            this.m_RecruitmentCode = RecruitmentCode;
        }

        private void chSex_BeforePrint(object sender, PrintEventArgs e)
        {
            if (Convert.ToBoolean(this.chSex.Text))
            {
                this.chSex.Text = "Nam";
            }
            else
            {
                this.chSex.Text = "Nữ";
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void dtBirthday_BeforePrint(object sender, PrintEventArgs e)
        {
            this.dtBirthday.Text = Convert.ToDateTime(this.dtBirthday.Text).ToShortDateString();
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.xrLine2 = new XRLine();
            this.txtRecruitment = new XRLabel();
            this.xrTable2 = new XRTable();
            this.xrTableRow2 = new XRTableRow();
            this.txtOrder = new XRTableCell();
            this.txtCandidateCode = new XRTableCell();
            this.txtFirstName = new XRTableCell();
            this.txtLastName = new XRTableCell();
            this.dtBirthday = new XRTableCell();
            this.chSex = new XRTableCell();
            this.txtBirthPlace = new XRTableCell();
            this.txtEmployeeAddress = new XRTableCell();
            this.txtCellPhone = new XRTableCell();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.ptPhoto = new XRPictureBox();
            this.xrLabel4 = new XRLabel();
            this.txtUnit = new XRLabel();
            this.txtAddress = new XRLabel();
            this.txtCompany = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.xrTableCell1 = new XRTableCell();
            this.xrTableCell14 = new XRTableCell();
            this.xrTableCell13 = new XRTableCell();
            this.xrTableCell2 = new XRTableCell();
            this.xrTableCell3 = new XRTableCell();
            this.xrTableCell4 = new XRTableCell();
            this.xrTableCell18 = new XRTableCell();
            this.xrTableCell21 = new XRTableCell();
            this.xrTableCell17 = new XRTableCell();
            this.ReportFooter = new ReportFooterBand();
            this.DetailReport = new DetailReportBand();
            this.Detail1 = new DetailBand();
            this.GroupHeader2 = new GroupHeaderBand();
            this.xrTable2.BeginInit();
            this.xrTable1.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { this.xrLine2, this.txtRecruitment });
            this.Detail.HeightF = 31f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.xrLine2.BorderWidth = 0;
            this.xrLine2.ForeColor = Color.DarkGray;
            this.xrLine2.LocationFloat = new PointFloat(4.768372E-05f, 22.99999f);
            this.xrLine2.Name = "xrLine2";
            this.xrLine2.SizeF = new SizeF(1039f, 3.208319f);
            this.xrLine2.StylePriority.UseBorderWidth = false;
            this.xrLine2.StylePriority.UseForeColor = false;
            this.txtRecruitment.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtRecruitment.LocationFloat = new PointFloat(4.768372E-05f, 0f);
            this.txtRecruitment.Name = "txtRecruitment";
            this.txtRecruitment.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtRecruitment.SizeF = new SizeF(1039f, 21f);
            this.txtRecruitment.StylePriority.UseFont = false;
            this.txtRecruitment.StylePriority.UseTextAlignment = false;
            this.txtRecruitment.Text = "txtRecruitment";
            this.txtRecruitment.TextAlignment = TextAlignment.MiddleLeft;
            this.txtRecruitment.BeforePrint += new PrintEventHandler(this.txtRecruitment_BeforePrint);
            this.xrTable2.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable2.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Rows.AddRange(new XRTableRow[] { this.xrTableRow2 });
            this.xrTable2.SizeF = new SizeF(1039f, 29.16667f);
            this.xrTable2.StylePriority.UseBorders = false;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { this.txtOrder, this.txtCandidateCode, this.txtFirstName, this.txtLastName, this.dtBirthday, this.chSex, this.txtBirthPlace, this.txtEmployeeAddress, this.txtCellPhone });
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1.0;
            this.txtOrder.Name = "txtOrder";
            this.txtOrder.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtOrder.StylePriority.UsePadding = false;
            this.txtOrder.StylePriority.UseTextAlignment = false;
            this.txtOrder.Text = "txtOrder";
            this.txtOrder.TextAlignment = TextAlignment.MiddleLeft;
            this.txtOrder.Weight = 0.18749981602642024;
            this.txtOrder.BeforePrint += new PrintEventHandler(this.txtOrder_BeforePrint);
            this.txtCandidateCode.Name = "txtCandidateCode";
            this.txtCandidateCode.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtCandidateCode.StylePriority.UsePadding = false;
            this.txtCandidateCode.StylePriority.UseTextAlignment = false;
            this.txtCandidateCode.Text = "txtCandidateCode";
            this.txtCandidateCode.TextAlignment = TextAlignment.MiddleLeft;
            this.txtCandidateCode.Weight = 0.50972208430404586;
            this.txtFirstName.Name = "txtFirstName";
            this.txtFirstName.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtFirstName.StylePriority.UsePadding = false;
            this.txtFirstName.StylePriority.UseTextAlignment = false;
            this.txtFirstName.Text = "txtFirstName";
            this.txtFirstName.TextAlignment = TextAlignment.MiddleLeft;
            this.txtFirstName.Weight = 0.63611097551659967;
            this.txtLastName.Name = "txtLastName";
            this.txtLastName.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtLastName.StylePriority.UsePadding = false;
            this.txtLastName.StylePriority.UseTextAlignment = false;
            this.txtLastName.Text = "txtLastName";
            this.txtLastName.TextAlignment = TextAlignment.MiddleLeft;
            this.txtLastName.Weight = 0.28333369813443543;
            this.dtBirthday.Name = "dtBirthday";
            this.dtBirthday.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.dtBirthday.StylePriority.UsePadding = false;
            this.dtBirthday.StylePriority.UseTextAlignment = false;
            this.dtBirthday.Text = "dtBirthday";
            this.dtBirthday.TextAlignment = TextAlignment.MiddleLeft;
            this.dtBirthday.Weight = 0.408944209647367;
            this.dtBirthday.BeforePrint += new PrintEventHandler(this.dtBirthday_BeforePrint);
            this.chSex.Name = "chSex";
            this.chSex.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.chSex.StylePriority.UsePadding = false;
            this.chSex.StylePriority.UseTextAlignment = false;
            this.chSex.Text = "chSex";
            this.chSex.TextAlignment = TextAlignment.MiddleCenter;
            this.chSex.Weight = 0.36195866288386475;
            this.chSex.BeforePrint += new PrintEventHandler(this.chSex_BeforePrint);
            this.txtBirthPlace.Name = "txtBirthPlace";
            this.txtBirthPlace.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtBirthPlace.StylePriority.UsePadding = false;
            this.txtBirthPlace.StylePriority.UseTextAlignment = false;
            this.txtBirthPlace.Text = "txtBirthPlace";
            this.txtBirthPlace.TextAlignment = TextAlignment.MiddleLeft;
            this.txtBirthPlace.Weight = 0.80640229250794482;
            this.txtEmployeeAddress.Name = "txtEmployeeAddress";
            this.txtEmployeeAddress.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtEmployeeAddress.StylePriority.UsePadding = false;
            this.txtEmployeeAddress.StylePriority.UseTextAlignment = false;
            this.txtEmployeeAddress.Text = "txtEmployeeAddress";
            this.txtEmployeeAddress.TextAlignment = TextAlignment.MiddleLeft;
            this.txtEmployeeAddress.Weight = 1.4794734176589024;
            this.txtCellPhone.Name = "txtCellPhone";
            this.txtCellPhone.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtCellPhone.StylePriority.UsePadding = false;
            this.txtCellPhone.StylePriority.UseTextAlignment = false;
            this.txtCellPhone.Text = "txtCellPhone";
            this.txtCellPhone.TextAlignment = TextAlignment.MiddleLeft;
            this.txtCellPhone.Weight = 0.86788850217458613;
            this.TopMargin.HeightF = 70f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 56f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.ptPhoto, this.xrLabel4, this.txtUnit, this.txtAddress, this.txtCompany, this.xrLabel2 });
            this.ReportHeader.HeightF = 123f;
            this.ReportHeader.Name = "ReportHeader";
            this.ptPhoto.LocationFloat = new PointFloat(9.000007f, 5.000007f);
            this.ptPhoto.Name = "ptPhoto";
            this.ptPhoto.SizeF = new SizeF(88.54166f, 58.33333f);
            this.ptPhoto.Sizing = ImageSizeMode.ZoomImage;
            this.xrLabel4.Font = new Font("Times New Roman", 16f, FontStyle.Bold);
            this.xrLabel4.LocationFloat = new PointFloat(3.178914E-05f, 68.75f);
            this.xrLabel4.Name = "xrLabel4";
            this.xrLabel4.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel4.SizeF = new SizeF(1039f, 30.25001f);
            this.xrLabel4.StylePriority.UseFont = false;
            this.xrLabel4.StylePriority.UseTextAlignment = false;
            this.xrLabel4.Text = "DANH S\x00c1CH ỨNG VI\x00caN DỰ TUYỂN";
            this.xrLabel4.TextAlignment = TextAlignment.MiddleCenter;
            this.txtUnit.LocationFloat = new PointFloat(666.0834f, 10.00001f);
            this.txtUnit.Name = "txtUnit";
            this.txtUnit.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtUnit.SizeF = new SizeF(372.9166f, 17.70833f);
            this.txtUnit.StylePriority.UseTextAlignment = false;
            this.txtUnit.TextAlignment = TextAlignment.MiddleRight;
            this.txtAddress.LocationFloat = new PointFloat(156.4166f, 30.70837f);
            this.txtAddress.Name = "txtAddress";
            this.txtAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtAddress.SizeF = new SizeF(413.3749f, 17.70833f);
            this.txtAddress.Text = "txtAddress";
            this.txtCompany.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtCompany.LocationFloat = new PointFloat(107.625f, 9.000007f);
            this.txtCompany.Name = "txtCompany";
            this.txtCompany.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtCompany.SizeF = new SizeF(462.1666f, 17.70833f);
            this.txtCompany.StylePriority.UseFont = false;
            this.txtCompany.Text = "txtCompany";
            this.xrLabel2.LocationFloat = new PointFloat(107.625f, 30.70827f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(48.7916f, 17.70833f);
            this.xrLabel2.Text = "Địa chỉ:";
            this.xrTable1.AnchorVertical = VerticalAnchorStyles.Bottom;
            this.xrTable1.BackColor = Color.WhiteSmoke;
            this.xrTable1.Borders = BorderSide.All;
            this.xrTable1.LocationFloat = new PointFloat(4.768372E-05f, 0f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1 });
            this.xrTable1.SizeF = new SizeF(1039f, 28.125f);
            this.xrTable1.StylePriority.UseBackColor = false;
            this.xrTable1.StylePriority.UseBorders = false;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { this.xrTableCell1, this.xrTableCell14, this.xrTableCell13, this.xrTableCell2, this.xrTableCell3, this.xrTableCell4, this.xrTableCell18, this.xrTableCell21, this.xrTableCell17 });
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1.0;
            this.xrTableCell1.CanGrow = false;
            this.xrTableCell1.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.StylePriority.UseTextAlignment = false;
            this.xrTableCell1.Text = "STT";
            this.xrTableCell1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell1.Weight = 0.18749992582046493;
            this.xrTableCell14.CanGrow = false;
            this.xrTableCell14.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell14.Name = "xrTableCell14";
            this.xrTableCell14.StylePriority.UseFont = false;
            this.xrTableCell14.StylePriority.UseTextAlignment = false;
            this.xrTableCell14.Text = "M\x00e3 UV";
            this.xrTableCell14.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell14.Weight = 0.50972216874420684;
            this.xrTableCell13.CanGrow = false;
            this.xrTableCell13.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell13.Name = "xrTableCell13";
            this.xrTableCell13.StylePriority.UseFont = false;
            this.xrTableCell13.StylePriority.UseTextAlignment = false;
            this.xrTableCell13.Text = "Họ l\x00f3t";
            this.xrTableCell13.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell13.Weight = 0.63611084903845827;
            this.xrTableCell2.CanGrow = false;
            this.xrTableCell2.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.StylePriority.UseFont = false;
            this.xrTableCell2.StylePriority.UseTextAlignment = false;
            this.xrTableCell2.Text = "T\x00ean";
            this.xrTableCell2.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell2.Weight = 0.28333359176452011;
            this.xrTableCell3.CanGrow = false;
            this.xrTableCell3.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.StylePriority.UseFont = false;
            this.xrTableCell3.StylePriority.UseTextAlignment = false;
            this.xrTableCell3.Text = "Ng\x00e0y sinh";
            this.xrTableCell3.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell3.Weight = 0.40894431185845292;
            this.xrTableCell4.CanGrow = false;
            this.xrTableCell4.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.StylePriority.UseFont = false;
            this.xrTableCell4.StylePriority.UseTextAlignment = false;
            this.xrTableCell4.Text = "Giới t\x00ednh";
            this.xrTableCell4.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell4.Weight = 0.36195831196209949;
            this.xrTableCell18.CanGrow = false;
            this.xrTableCell18.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell18.Name = "xrTableCell18";
            this.xrTableCell18.StylePriority.UseFont = false;
            this.xrTableCell18.StylePriority.UseTextAlignment = false;
            this.xrTableCell18.Text = "Nơi sinh";
            this.xrTableCell18.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell18.Weight = 0.80640272041744154;
            this.xrTableCell21.CanGrow = false;
            this.xrTableCell21.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell21.Name = "xrTableCell21";
            this.xrTableCell21.StylePriority.UseFont = false;
            this.xrTableCell21.StylePriority.UseTextAlignment = false;
            this.xrTableCell21.Text = "Địa chỉ";
            this.xrTableCell21.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell21.Weight = 1.4794726391316035;
            this.xrTableCell17.CanGrow = false;
            this.xrTableCell17.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell17.Name = "xrTableCell17";
            this.xrTableCell17.StylePriority.UseFont = false;
            this.xrTableCell17.StylePriority.UseTextAlignment = false;
            this.xrTableCell17.Text = "Điện thoại";
            this.xrTableCell17.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell17.Weight = 0.86788870410009622;
            this.ReportFooter.HeightF = 11f;
            this.ReportFooter.Name = "ReportFooter";
            this.DetailReport.Bands.AddRange(new Band[] { this.Detail1, this.GroupHeader2 });
            this.DetailReport.Level = 0;
            this.DetailReport.Name = "DetailReport";
            this.Detail1.Controls.AddRange(new XRControl[] { this.xrTable2 });
            this.Detail1.HeightF = 29.16667f;
            this.Detail1.Name = "Detail1";
            this.GroupHeader2.Controls.AddRange(new XRControl[] { this.xrTable1 });
            this.GroupHeader2.HeightF = 28.125f;
            this.GroupHeader2.Name = "GroupHeader2";
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.ReportFooter, this.DetailReport });
            base.Landscape = true;
            base.Margins = new Margins(0x47, 0x3b, 70, 0x38);
            base.PageHeight = 0x33b;
            base.PageWidth = 0x491;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListCandidate_BeforePrint);
            this.xrTable2.EndInit();
            this.xrTable1.EndInit();
            this.EndInit();
        }

        private void LoadAllData()
        {
            DataSet set = new DataSet();
            DataTable list = new DataTable();
            list = this.l_Recruitment.GetList();
            set.Tables.Add(list);
            base.DataSource = set;
            this.txtRecruitment.DataBindings.Add("Text", base.DataSource, "RecruitmentCode");
        }

        private void LoadData()
        {
            this.txtRecruitment.Text = this.m_RecruitmentCode;
        }

        private void rptListCandidate_BeforePrint(object sender, PrintEventArgs e)
        {
            if (this.m_RecruitmentCode == "")
            {
                this.LoadAllData();
            }
            else
            {
                this.LoadData();
            }
            ////if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.txtCompany.Text = "";//MyInfo.Company.ToUpper();
                this.txtAddress.Text = "";//MyInfo.Address;
                this.ptPhoto.Image = null;//MyInfo.Photo;
            }
            CreateFooterReport.CreateFooter("IsOther", this.ReportFooter, this);
        }

        private void txtOrder_BeforePrint(object sender, PrintEventArgs e)
        {
            this.m_Order++;
            this.txtOrder.Text = this.m_Order.ToString();
        }

        private void txtRecruitment_BeforePrint(object sender, PrintEventArgs e)
        {
            this.m_RecruitmentCode = this.txtRecruitment.Text;
            this.l_Recruitment.Get(this.m_RecruitmentCode);
            this.txtRecruitment.Text = this.l_Recruitment.RecruitmentName;
            DataSet set = new DataSet();
            DataTable list = new DataTable();
            list = this.l_Candidate.GetList(this.m_RecruitmentCode, 0);
            set.Tables.Add(list);
            this.DetailReport.DataSource = set;
            this.txtCandidateCode.DataBindings.Add("Text", this.DetailReport.DataSource, "CandidateCode");
            this.txtFirstName.DataBindings.Add("Text", this.DetailReport.DataSource, "FirstName");
            this.txtLastName.DataBindings.Add("Text", this.DetailReport.DataSource, "LastName");
            this.dtBirthday.DataBindings.Add("Text", this.DetailReport.DataSource, "Birthday");
            this.chSex.DataBindings.Add("Text", this.DetailReport.DataSource, "Sex");
            this.txtBirthPlace.DataBindings.Add("Text", this.DetailReport.DataSource, "BirthPlace");
            this.txtEmployeeAddress.DataBindings.Add("Text", this.DetailReport.DataSource, "MainAddress");
            this.txtCellPhone.DataBindings.Add("Text", this.DetailReport.DataSource, "CellPhone");
        }
    }
}

